package com.citycloud.ccuap.tc.sync.dto;

import com.citycloud.ccuap.commons.sys.entity.SysDeptment;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zjl
 * @date 2020/04/27 19:29
 */
@Data
public class DepartmentMessageDTO implements Serializable {
    /**站点ID*/
    private Long projectId;

    /**部门ID*/
    private Long deptId;
    /**部门名称*/
    private String deptName;
//    /**部门全称*/
//    private String fullPath;
//    /**机构ID*/
//    private Long groupId;
    /**父节点ID*/
    private Long pid;
    /**部门编号*/
    private String deptCode;
    /**部门排序号*/
    private Long orderNo;
    /**部门类型*/
    private Short deptType;
    /**联系人*/
    private String telephone;
    /**启用/禁用*/
    private Short dataStatus;
    /**修改版本*/
    private Integer version;
    /**创建时间*/
    private Date createdTime;

    /**描述*/
    private String remark;

    public DepartmentMessageDTO build(SysDeptment deptment){
        this.projectId = deptment.getProjectId();
        this.deptId = deptment.getDeptId();
        this.deptName = deptment.getDeptName();
//        this.fullPath = deptment.getFullPath();
//        this.groupId = deptment.getGroupId();
        this.pid = deptment.getPid();
        this.deptCode = deptment.getDeptCode();
        this.orderNo = deptment.getOrderNo();
        this.deptType = deptment.getDeptType();
        this.telephone = deptment.getTelephone();
        this.dataStatus = deptment.getDataStatus();
        this.version = deptment.getVersion();
        this.createdTime = deptment.getCreatedTime();
        this.remark = deptment.getRemark();
        return this;
    }

}
